<extend file='resource/admin/base'/>
<block name="content">
    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#tab1">栏目首页</a></li>
        <li><a href="{{u('post')}}" >栏目添加</a></li>
    </ul>
    <table class="table table-hover">
        <thead>
        <tr>
            <th width="8%">编号</th>
            <th>栏目名称</th>
            <th>是否封面栏目</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach from="$cateData" value="$d">
            <tr>
                <td>{{$d['cate_id']}}</td>
                <td>{{$d['_cate_name']}}</td>
                <td>
                    <if value="$d['ishome']">
                        <i class="fa fa-check-circle alert-success"  aria-hidden="true"></i>
                        <else/>
                        <i class="fa fa-times-circle" aria-hidden="true"></i>
                    </if>
                </td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a href="/c/{{$d['cate_id']}}.html" class="btn btn-primary">栏目预览</a>
                        <a href="{{u('post',['cate_id'=>$d['cate_id']])}}" class="btn btn-success">编辑</a>
                        <a href="{{u('del',['cate_id'=>$d['cate_id']])}}" class="btn btn-danger">删除</a>
                    </div>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
</block>
